﻿@model Rhomble.ViewModels.Projects.IndexViewModel

@{
    ViewBag.Title = "Projects";
}

@Html.ActionLink("Add New Project", "Create", null, new { @class = "button-link" })

@(Html.TableFor(model => model.Projects)
	.WithAttributes(new { cellspacing = "0", cellpadding = "0" })
	.WithRowAttributes(new { @class = "odd" }, r => r.RowNumber % 2 == 1)
	.WithRowAttributes(new { @class = "even" }, r => r.RowNumber % 2 == 0)
	.WithColumns(cols =>
	{
		cols.For(c => Html.ActionLink("Edit", "Edit", new { id = c.ID }));
		cols.For(c => c.Name);
		cols.For(c => c.Customer).WithDisplayName("Customer Name");
	})
	.ToMvcHtmlString())